<%
	require 'controller/selection_helper'
	selectionHelper = SelectionHelper.new
	#一覧の取得(暫定的に全て取得)
	selections = selectionHelper.list() 
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<!-- スタイルシートの読み込み-->
		<link rel="stylesheet" type="text/css" href="css/register_question.css">
		<!-- JavaScriptの読み込み -->
		<script type="text/javascript" src="./js/form_helper.js"></script>
		<script type="text/javascript" src="./js/do_post.js"></script>
        <title>Register Question</title>
    </head>
    <body>
        <div id="container">
            <div id="header">
                <h2>問題の登録</h2>
            </div>
            <div id="center-panel">
                <div id="add-question">
                    <form name="question_form" action="add_question.rhtml" method="post" accept-charset="utf-8" style="border: solid 2px;">
                        <!--TODO:入力チェック。-->
                        <p>問題名：<input class="question_title" type="text" name="question_title" value="" maxlength="100" size="40"></p>
                        <p>問題文：<input class="question_content" type="text" name="question_content" value="" maxlength="1000" size="40"></p>

						<input type="hidden" name="selection_size" value="0">
						<p><input type="submit" value="登録" onclick="return questionFormCanPost();"></p>
                        <p>選択肢<span><a class="add_selection" href="javascript:void(0)" onclick="addSelection()" title="add selection">add selection</a></span></p>
                    </form>
                </div>
            </div>
            <div id="footer">
				<form action="main.rhtml" id="to_home" method="post" accept-charset="utf-8">
					<p><a href="javascript:doPostToHome();">Home</a></p>
				</form>
            </div>
        </div>
    </body>
</html>